home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 12 / ACDemo.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  610 b   |  16 lines

  1. class ACDemo {
  2. static byte a[] = { 65, 66, 67, 68, 69, 70, 71, 72, 73, 74 };
  3. static byte b[] = { 77, 77, 77, 77, 77, 77, 77, 77, 77, 77 };
  4. public static void main(
  5. String args[]) {
  6. System.out.println("a = " + new String(a, 0));
  7. System.out.println("b = " + new String(b, 0));
  8. System.arraycopy(a, 0, b, 0, a.length);
  9. System.out.println("a = " + new String(a, 0));
  10. System.out.println("b = " + new String(b, 0));
  11. System.arraycopy(a, 0, a, 1, a.length - 1);
  12. System.arraycopy(b, 1, b, 0, b.length - 1);
  13. System.out.println("a = " + new String(a, 0));
  14. System.out.println("b = " + new String(b, 0));
  15. } }
  16.